/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package doghost.reports;

import java.util.HashMap;

/**
 *
 * @author duo
 */
public class FaturamentoSelecionadoReport {

    public FaturamentoSelecionadoReport(Long id) throws java.text.ParseException {
        ReportRunner reportRunner = new ReportRunner("doghostPU");
        reportRunner.setReportFileName("/doghost/reports/Faturamento.jasper");
        HashMap parameters = new HashMap();
        parameters.put("ID_HOSPEDAGEM", id);
        reportRunner.setParametersMap(parameters);
        // alternativa: enviando query
        /*
        EntityManagerFactory emf = Persistence.createEntityManagerFactory(
                "scManutencaoPU", new HashMap());
        EntityManager em = emf.createEntityManager();
        Query query = em.createQuery("SELECT o FROM Orcamento o WHERE o.idorcamento = " +
                " :id"); // NOI18N
        query.setParameter("id", id);
        reportRunner.setReportQuery(query);
        */
        reportRunner.runReport();
    }
}
